﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.SessionState;
using Rio.Workflow.WCF.Configuration;

namespace RioWorkflowWebHost
{
    public class Global : System.Web.HttpApplication
    {

        /// <summary>
        /// Handles the Start event of the Application control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs" /> instance containing the event data.</param>
        void Application_Start(object sender, EventArgs e)
        {
            ServiceManager.StartServiceForWebHosting();
        }

        /// <summary>
        /// Handles the End event of the Application control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs" /> instance containing the event data.</param>
        void Application_End(object sender, EventArgs e)
        {
            ServiceManager.Shutdown();
        }

    }
}
